import newRequest from '@/utils/newRequest'
import request from '@/utils/request'
import { mergeParams } from '@/utils'

export function getTechList(query) {
  return request({
    url: '/api/v1/tech/list',
    method: 'get',
    params: query
  })
}

export function getPriceNoList(query) {
  return request({
    url: '/api/v1/priceNo/list',
    method: 'get',
    params: query
  })
}

export function getPriceNoInfo(query) {
  return request({
    url: '/api/v1/priceNo/info',
    method: 'get',
    params: query
  })
}

export function getLimitTechList(query) {
  return request({
    url: '/api/v1/limit-tech/list',
    method: 'get',
    params: query
  })
}

export function getNewTechList(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/xjsUnlimitType/doQueryPage',
    method: 'post',
    data
  })
}

export function getNewLimitTechList(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/xjsLimitType/doQueryPage',
    method: 'post',
    data
  })
}

export function exportLimitTechList(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/xjsLimitType/doExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

export function exportTechList(query) {
  const data = mergeParams(query)
  return newRequest({
    url: '/MTSaas/xjsUnlimitType/doExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
